﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using rock.UI.pictureinfo.subview;

namespace rock.UI.pictureinfo
{
    public partial class UserControlBuildMarFloorOnekPicture : UserControl
    {
        public UserControlBuildMarFloorOnekPicture()
        {
            InitializeComponent();
        }

        private void userControlHouse63_Load(object sender, EventArgs e)
        {
            getHouse(list, this);
            
        }

        List<UserControlHouse> list = new List<UserControlHouse>();
       

        public void refreshStatus() {
            this.progressBar1.Maximum = list.Count;
            int index  = 1; 
            foreach (UserControlHouse temp in list)
            {  
                temp.inits();
                this.progressBar1.Value = index++;
            }
        }
        public void getHouse(List<UserControlHouse> list, Control parentControl)
        {
            foreach (Control c in parentControl.Controls)
            {
                if (c is UserControlHouse)
                {
                    UserControlHouse temp = (UserControlHouse)c;
                    list.Add(temp);
                }
                else
                {
                    getHouse(list, c);
                }
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            refreshStatus();
        }

        private void label9_Click(object sender, EventArgs e)
        {

        }

        private void panel5_Paint(object sender, PaintEventArgs e)
        {

        }

        private void panel13_Paint(object sender, PaintEventArgs e)
        {

        }
    }
}
